package com.wiiss.business.domain.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.Date;

/**
 * 机台下料-mcs 页面
 */
@Data
public class UnloadItemReq implements Serializable {

    /**
     * 任务类型
     */
    @ApiModelProperty(value = "任务类型", hidden = true)
    private String missionType;
    /**
     * 搬运类型 true-空载；false-满载
     */
    @ApiModelProperty(value = "搬运类型", hidden = true)
    private Boolean isEmpty;

    /**
     * 任务来源
     * mes - mes下发；mcs - mcs页面下发；auto - 自动搬运任务
     */
    @ApiModelProperty(value = "任务来源", hidden = true,example = "mes")
    private String origin;

    /**
     * 板机编码
     */
    @NotBlank(message = "板机编码不能为空")
    @ApiModelProperty(value = "板机编码", required = true,example = "syf_loader")
    private String eqpCode;
    /**
     * 端口编码
     */
    @NotBlank(message = "端口编码不能为空")
    @ApiModelProperty(value = "端口编码", required = true,example = "syf_port_code")
    private String portCode;

    /**
     * 载具编码
     */
//    @NotBlank(message = "载具编码不能为空")
    @ApiModelProperty(value = "载具编码", required = true,example = "B1622222")
    private String carrierCode;

    /**
     * 载具类型
     */
    @ApiModelProperty(value = "载具类型", hidden = true)
    private String carrierType;

    /**
     * 物料批次号
     */
//    @NotBlank(message = "物料批次号不能为空")
    @ApiModelProperty(value = "物料批次号", required = true,example = "1")
    private String lotCode;
    /**
     * 物料编码
     */
    @ApiModelProperty(value = "物料编码", example = "1")
    private String itemCode;

    /**
     * 物料名称
     */
    @ApiModelProperty(value = "物料名称", example = "1")
    private String itemName;

    /**
     * 层别
     */
    @ApiModelProperty(value = "层别", hidden = true,example = "1")
    private String layer;

    /**
     * 物料数量
     */
    @ApiModelProperty(value = "物料数量", example = "1")
    private Integer lotQty;

    /**
     * 产品类型
     */
    @ApiModelProperty(value = "产品类型", example = "1")
    private String productType;

    /**
     * 物料状态(对应stepFlag 待定)
     */
    @ApiModelProperty(value = "物料状态", example = "1")
    private String productStatus;

    /**
     * 下制程编码
     */

    @ApiModelProperty(value = "下制程编码", hidden = true,example = "syfpro1")
    private String currentProcessCode;

    /**
     * 下制程名称
     */
//    @NotBlank(message = "当前制程名称不能为空")
    @ApiModelProperty(value = "当前制程名称",required = true, example = "syf制程1")
    private String currentProcessName;

    /**
     * 当前制程名称
     */
//    @NotBlank(message = "下制程名称不能为空")
    @ApiModelProperty(value = "下制程名称", required = true,example = "syf制程2")
    private String nextProcessName;
    /**
     * 急料板机编码
     */
    @ApiModelProperty(value = "急料板机编码", hidden = true,example = "42")
    private String urgentEqpCode;
    private String urgentPortCode;
    /**
     * 急料板机名称
     */
    @ApiModelProperty(value = "急料板机名称", hidden = true,example = "syf_loader2")
    private String urgentEqpName;


    /**
     * 任务优先級
     */
    @ApiModelProperty(value = "任务优先級", example = "1")
    private String taskPriority;

    /**
     * 状态标志
     *
     * 0本站立库， 1下站立库，2首件检验区，3首件合并区，4 NG区，5 动态初件
     */
    @ApiModelProperty(value = "状态标志", example = "1")
    private String stepFlag;

    /**
     *下料后做什么？StockIn：入库，Load：上料 到板机
     */
    @ApiModelProperty(value = "下料后做什么", required = true,example = "StockIn")
    private String action;

    /**
     *目标设备（当 Action 为 Load）
     */
    @ApiModelProperty(value = "目标设备", example = "wip123")
    private String toEqpCode;

    /**
     *目标设备的 Port 口信息（当 Action 为 Load）
     */
    @ApiModelProperty(value = "目标设备的 Port", example = "dock123")
    private String toPortCode;

    /**
     * mes下发时的taskCode，只做记录
     */
    @ApiModelProperty(value = " mes下发时taskCode", required = true,example = "MES202201010101001")
    private String taskCode;



    // 批次状态：暂停 / 释放
    @ApiModelProperty(value = "批次状态：暂停 / 释放", hidden = true)
    private String lotStatus;
    // 在制品单位
    @ApiModelProperty(value = "在制品单位", hidden = true)
    private String lotUnit;
    // PNL数量
    @ApiModelProperty(value = "PNL数量", hidden = true)
    private Integer pnlQty;
    // SET数量
    @ApiModelProperty(value = "SET数量", hidden = true)
    private Integer setQty;
    // PCS数量
    @ApiModelProperty(value = "PCS数量", hidden = true)
    private Integer pcsQty;
    // 订单交期
    @ApiModelProperty(value = "订单交期", hidden = true)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date orderDeliveryDate;
    // 下制程编码
    @ApiModelProperty(value = "下制程编码", hidden = true)
    private String nextProcessCode;
    // 有效时间：截止日期
    @ApiModelProperty(value = "有效时间：截止日期", hidden = true)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date expiryDate;
    // 停留时间(静置时间): 小时
    @ApiModelProperty(value = "停留时间(静置时间): 小时", hidden = true)
    private Float holdingTime;
    // 预警时间：小时
    @ApiModelProperty(value = "预警时间：小时", hidden = true)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date warningTime;
    // 告警时间：小时
    @ApiModelProperty(value = "告警时间：小时", hidden = true)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date alarmTime;
    // 销售订单
    @ApiModelProperty(value = "销售订单", hidden = true)
    private String salesOrder;
    // 客户周期码
    @ApiModelProperty(value = "客户周期码", hidden = true)
    private String customerPeriodCode;
}
